Theory of zk-SNARKs